const TokenType = {
    Initial: new Symbol("Initial"),
    Id: new Symbol("Id"),
    Operator: new Symbol("Operator"),
    Value: new Symbol("Value"),
    Key: new Symbol("Key")
};

let testStr = "let a = 1";

function parse (content) {

    let state = TokenType.Initial;

    let i = 0;
    while (i < content.length) {
        let indexChar = content[i];
        switch (state) {
            case (TokenType.Initial): {

                break;
            }
            case (TokenType.Id): {
                break;
            }
            case (TokenType.Operator): {
                break;
            }
            case (TokenType.Value): {
                break;
            }
            case (TokenType.Key): {
                break;
            }
        }
    }

}

function isDigit